home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / web / noweb / src / shell / notangle.nw < prev    next >
Text File  |  1995-02-24  |  774b  |  26 lines

  1. <<copyright notice>>=
  2. # Copyright 1991 by Norman Ramsey.  All rights reserved.
  3. # See file COPYRIGHT for more information.
  4. <<notangle>>=
  5. #!/bin/sh
  6. <<copyright notice>>
  7. LIB=|LIBDIR|
  8. markup=$LIB/markup opt= arg= markopt= filters=
  9. while [ $# -gt 0 ]; do
  10.     case $1 in
  11.         -ml|-m3|-awk|-icn|-icon|-pascal|-c|-c++|-f77|-f90|-tex|-w[0-9][0-9]*) ;; 
  12.                     # deliberately ignore nountangle args
  13.     -t)  ;; # this is default
  14.         -t*) markopt="$markopt -t" ; opt="$opt '$1'" ;;
  15.         # copy tabs at markup, use width given in notangle
  16.     -filter) filters="$filters $2 | " ; shift ;;
  17.     -markup) markup="$2" ; shift ;;
  18.     -)   arg="$arg '$1'" ;;
  19.     -*)  opt="$opt '$1'" ;;
  20.     *)   arg="$arg '$1'" ;;
  21.     esac
  22.     shift
  23. done
  24. PATH="$PATH:$LIB" eval "$markup $markopt $arg | $filters $LIB/nt $opt"
  25. exit $?
  26.